feat(Dropdown): Add optional container with ouiaId#12022
Merged
thatblindgeye merged 2 commits intopatternfly:mainfrom Nov 26, 2025
Merged
feat(Dropdown): Add optional container with ouiaId#12022thatblindgeye merged 2 commits intopatternfly:mainfrom
thatblindgeye merged 2 commits intopatternfly:mainfrom
Conversation
Collaborator
|
Preview: https://pf-react-pr-12022.surge.sh A11y report: https://pf-react-pr-12022-a11y.surge.sh |
Container component can be customized via a prop as well. Container does not render if containerOuiaId is not used, so as not to break existing consumers.
9e6f0f3 to
0b753bf
Compare
wise-king-sullyman
approved these changes
Oct 21, 2025
packages/react-core/src/components/Dropdown/__tests__/Dropdown.test.tsx
Outdated
Show resolved
Hide resolved
Contributor
thatblindgeye
left a comment
There was a problem hiding this comment.
For and easier way to make the update
packages/react-core/src/components/Dropdown/__tests__/Dropdown.test.tsx
Outdated
Show resolved
Hide resolved
….test.tsx Co-authored-by: Eric Olkowski <70952936+thatblindgeye@users.noreply.github.com>
thatblindgeye
approved these changes
Nov 26, 2025
Collaborator
|
Your changes have been released in:
Thanks for your contribution! 🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Technically this is possible for consumers already - they can import the ouia helper function and create a component in their repo to wrap all PF Dropdowns with if they want to.
This PR adds an optional container with a ouiaId. The container component type can be customized via a prop as well. Container does not render if containerOuiaId is not used so as not to break existing consumers.
Advised filer of issue that he can pass prop
popperProps={{appendTo: 'inline'}}to the Dropdown component if he wants Dropdown behavior similar to older versions of PatternFly (inline in DOM). Not addressing that here, but verified that passing that prop places both the toggle and dropdown in the container when the dropdown is open. If inline is not applied, menu will appear at Popper default location, but container will wrap toggle at least.I am not adjusting the behavior of the dropdown (removal from DOM). I think this would be a breaking change.
What: Closes #11086
Additional issues: